{% extends 'server_ui/templates/base.html' %}
{% block title %}{{ settings.SITE_TITLE }}{% endblock %}

{% block header %}
<h2>{{ settings.SITE_TITLE }}</h2>
{% endblock %}

{% block content %}

<div class="row"><div class="large-5 columns large-centered"><a href="/"><img border="0" src="{{ settings.MAIN_LOGO_URL }}" /></a></div></div>
<div class="row">&nbsp;</div>
<div class="large-9 columns">
  {% if settings.MASTER_HELIOS %}
<p>Helios 提供<b>可验证的在线选举</b>.</p>

<p>我们相信民主很重要，无论是您的读书俱乐部、家长教师协会、学生会、工会还是州政府。因此，我们让真正可验证的选举变得像网络上的其他一切一样简单。</p>
<p>
Helios 选举是:
<ul class="disc">
<li><b>private</b>: 没有人知悉您的选票如何投递.</li>
<li><b>verifiable</b>: 每个选民都有一个追踪码.</li>
<li><b>proven</b>: Helios是开源的，经过顶级专家的审查的，被主流组织所使用的.</li>
</ul>

<p>
超过 <b>2,000,000次投票</b> 通过Helios进行投递.
</p>

{% if create_p %}
<a class="button" href="{% url "elections@new" %}">创建选举</a>
{% endif %}

  {% else %}
  <p style="font-size: 1.4em;">
    {{settings.WELCOME_MESSAGE|safe}}
  </p>
  
  {% if elections|length %}
  <p>
    {% for election in elections %}
    <div class="panel">
      <a style="font-size: 1.4em;" href="{% url "shortcut@election" election.short_name %}">{{election.name}}</a>{% if settings.SHOW_USER_INFO %}<br /> by {{election.admin.display_html_small|safe}}{% endif %}
    </div>
    <br />
    {% endfor %}
  </p>
  {% else %}
  <h4>当前没有可用的选举</h4>
  {% endif %}
{% endif %}
  
</div>

<div class="large-3 columns" id="mystuff">
<div class="row">&nbsp;</div>
<div class="panel row">
{% if user %}
<!--<div class="row right">{{user.display_html_big|safe}}</div>-->
{% if create_p %}
<a class="small button" href="{% url "elections@new" %}">创建选举</a>
<h5 class="subheader">管理</h5>
{% if elections_administered %}
<ul>
{% for election in elections_administered %}
<li> <a href="{% url "election@view" election.uuid %}">{{election.name}}</a></li>
{% endfor %}
</ul>
{% else %}
<em>暂无</em>
{% endif %}
<div class="row right">
<a class="tiny button" href="{% url "elections@administered" %}">查看所有</a>
</div>
<div class="row"></div>
{% endif %}

<h5 class="subheader">近期投票</h5>
{% if elections_voted %}
<ul>
{% for election in elections_voted %}
<li><a href="{% url "election@view" election.uuid %}">{{election.name}}</a></li>
{% endfor %}
</ul>
{% else %}
<em>暂无</em>
{% endif %}
<div class="row right"><a class="tiny button" href="{% url "elections@voted" %}">查看所有</a></div>
<div class="row"></div>
{% else %}
{% if settings.SHOW_LOGIN_OPTIONS %}
<h5>登录以进行投票</h5>
{{login_box|safe}}
{% else %}
<p>
选择一个选举开始投票。完成投票后，系统会要求您提供投票凭证.
</p>
{% endif %}
{% endif %}
</div>
</div>


{% endblock %}
